﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Media.Imaging;
using Windows.Storage.Streams;
using Windows.Storage;


namespace TestApp
{
   public class imageChanger
    {
         //URI for ICONS
       Uri camerOn = new Uri("ms-appx:///Images/camera-lens-on.png", UriKind.Absolute);
       Uri camerOff = new Uri("ms-appx:///Images/camera-lens.png", UriKind.Absolute);
       Uri powerOn = new Uri("ms-appx:///Images/power-on.png", UriKind.Absolute);
       Uri powerOff = new Uri("ms-appx:///Images/power.png", UriKind.Absolute);
       Uri downArrowOn = new Uri("ms-appx:///Images/downArrowOn.png", UriKind.Absolute);
       Uri downArrowOff = new Uri("ms-appx:///Images/downArrow.png", UriKind.Absolute);
       Uri upArrowOn = new Uri("ms-appx:///Images/upArrowOn.png", UriKind.Absolute);
       Uri upArrowOff = new Uri("ms-appx:///Images/upArrow.png", UriKind.Absolute);
       Uri carOn = new Uri("ms-appx:///Images/carOn.png", UriKind.Absolute);
       Uri carOff = new Uri("ms-appx:///Images/car.png", UriKind.Absolute);
       Uri micOn = new Uri("ms-appx:///Images/micOn.png", UriKind.Absolute);
        Uri micOff = new Uri("ms-appx:///Images/micOff.png", UriKind.Absolute);
        Uri lightOn = new Uri("ms-appx:///Images/Light-Bulb-On.png", UriKind.Absolute);
        Uri lightOff = new Uri("ms-appx:///Images/Light-Bulb.png", UriKind.Absolute);

        BitmapImage tmp = new BitmapImage();


        public BitmapImage setImages(string image)
        {

            BitmapImage tempBitmap;

            switch (image)
            {
                case "start":
                    //tempBitmap. BeginInit();
                    //tempBitmap.UriSource = powerOn;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(powerOn);

                    return tempBitmap;

                case "micOn":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = micOn;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(micOn);
                    return tempBitmap;

                case "micOff":
                    //tempBitmap.BeginInit();
                  //tempBitmap.UriSource = micOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(micOff);
                    return tempBitmap;


                case "stop":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = powerOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(powerOff);
                    return tempBitmap;


                case "carOn":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = carOn;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(carOn);
                    return tempBitmap;


                case "carOff":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = carOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(carOff);
                    return tempBitmap;


                case "cameraOn":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = camerOn;
                    //tempBitmap.EndInit();

                    tempBitmap = new BitmapImage(camerOn);
                    return tempBitmap;


                case "cameraOff":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = camerOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(camerOff);
                    return tempBitmap;

                case "cameraUp":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = upArrowOn;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage();
                    return tempBitmap;

                case "cameraUpOff":
                    //tempBitmap.BeginInit();
                   // tempBitmap.UriSource = upArrowOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage();
                    return tempBitmap;

                case "cameraDown":
                    //tempBitmap.BeginInit();
                    //tempBitmap.UriSource = downArrowOn;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage();
                    return tempBitmap;

                case "cameraDownOff":
                    //tempBitmap.BeginInit();
                   // tempBitmap.UriSource = downArrowOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage();
                    return tempBitmap;

                case "lightOn":
                    //tempBitmap.BeginInit();
                    // tempBitmap.UriSource = downArrowOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(lightOn);
                    return tempBitmap;

                case "lightOff":
                    //tempBitmap.BeginInit();
                    // tempBitmap.UriSource = downArrowOff;
                    //tempBitmap.EndInit();
                    tempBitmap = new BitmapImage(lightOff);
                    return tempBitmap;




            }

            return tmp;
        }
           
    }
}
